package com.scalar.forecast.utils;

import com.scalar.forecast.commons.Constants;

import com.scalar.forecast.systemprefs.SystemPreferences;
import org.apache.struts.util.LabelValueBean;

import java.util.ArrayList;

/**
 * This class contains utility methods.
 *
 * @author  Basha
 * @version  1.0
 */
public class CommonUtils
{

    public static ArrayList getCanBuildMasterOverrideSalesForecast()
    {
        ArrayList saleForecastOverrideList = new ArrayList();

        saleForecastOverrideList.add( new LabelValueBean( Constants.BUILD_MASTER_CAN_NOT_OVERRIDE_SALES_FORECAST, SystemPreferences.BUILD_MASTER_CAN_NOT_OVERRIDE_SALES_FORECAST   ) );
        saleForecastOverrideList.add( new LabelValueBean( Constants.BUILD_MASTER_CAN_OVERRIDE_SALES_FORECAST, SystemPreferences.BUILD_MASTER_CAN_OVERRIDE_SALES_FORECAST   ) );

        return saleForecastOverrideList;
    }


    public static ArrayList getPartNumberTypes()
    {
        ArrayList partNumberTypeList = new ArrayList();

        partNumberTypeList.add( new LabelValueBean( Constants.MANFACTURING_PART_NUMBERS, SystemPreferences.MANFACTURING_PART_NUMBERS   ) );
        partNumberTypeList.add( new LabelValueBean( Constants.MARKETING_PART_NUMBERS, SystemPreferences.MARKETING_PART_NUMBERS   ) );

        return partNumberTypeList;
    }

    public static ArrayList getPriceTypes()
    {
        ArrayList priceTypeList = new ArrayList();

        priceTypeList.add( new LabelValueBean( Constants.STANDARD_PRICE, SystemPreferences.STANDARD_PRICE   ) );
        priceTypeList.add( new LabelValueBean( Constants.CUSTOMER_PRICE, SystemPreferences.CUSTOMER_PRICE   ) );

        return priceTypeList;
    }

 }

